From 1f401246c1094f0a069fa7458e2811091c5a8007 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 28 Apr 2006 14:33:40 +0100 Subject: [PATCH] When boot device is cdrom but the cdrom is not bootable, the guest appears to hang. This patch fixes this by filling in second- and third-priority fallback boot devices. Signed-off by: Chen Jun --- tools/ioemu/hw/pc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/ioemu/hw/pc.c b/tools/ioemu/hw/pc.c index d2de9abc3d..d2b72ac7fb 100644 --- a/tools/ioemu/hw/pc.c +++ b/tools/ioemu/hw/pc.c @@ -166,14 +166,20 @@ static void cmos_init(uint64_t ram_size, int boot_device, BlockDriverState **hd_ switch(boot_device) { case 'a': case 'b': - rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */ + //rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */ + rtc_set_memory(s, 0x3d, 0x21); /* a->c->d */ + rtc_set_memory(s, 0x38, 0x30); break; default: case 'c': - rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */ + //rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */ + rtc_set_memory(s, 0x3d, 0x32); /* c->d->a */ + rtc_set_memory(s, 0x38, 0x10); break; case 'd': - rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */ + //rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */ + rtc_set_memory(s, 0x3d, 0x23); /* d->c->a */ + rtc_set_memory(s, 0x38, 0x10); break; } -- 2.30.2